package com.bridge.app.dao.impl;

import com.bridge.app.dao.UserDAO;
import com.bridge.app.dataobject.User;
import com.bridge.app.framework.impl.IbatisBaseDao;

public class UserDAOImpl extends IbatisBaseDao implements UserDAO {

	@Override
	public String getPasswordByEmail(String email) {
		return (String) this.getSqlMapClientTemplate().queryForObject(
				"bridge.getPasswordByEmail", email);
	}

	@Override
	public boolean insertUser(User user) {
		int stauts = (Integer) this.getSqlMapClientTemplate().insert(
				"bridge.insertUser", user);
		if (stauts < 1) {
			return false;
		}
		return true;
	}

}
